#include <stdio.h>
#include "pattern_replace.h"

void print_binary(unsigned long num) 
{
    for (int i = 31; i >= 0; i--) 
    {
        printf("%lu", (num >> i) & 1);
        if (i % 4 == 0) printf(" ");  /* 每4位加个空格方便查看 */
    }
    printf("\n");
}

int main() 
{

    unsigned long input = 0b10101010101010101010101010101010;
    unsigned long result = pattern_replace(input);

    printf("Input Binary:\n");
    print_binary(input);

    printf("Output Binary:\n");
    print_binary(result);

    return 0;
}
